.class public Lcom/netease/newsreader/adapter/CitySearchAdapter;
.super Landroid/widget/BaseAdapter;
.source "CitySearchAdapter.java"

# interfaces
.implements Landroid/widget/Filterable;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;
    }
.end annotation


# instance fields
.field private mContext:Landroid/content/Context;

.field private mFilter:Landroid/widget/Filter;

.field private mFilterList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;>;"
        }
    .end annotation
.end field

.field private mInflater:Landroid/view/LayoutInflater;

.field private mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/widget/Filter;)V
    .locals 1
    .parameter "context"
    .parameter "filter"

    .prologue
    .line 33
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 23
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mFilterList:Ljava/util/List;

    .line 34
    iput-object p1, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mContext:Landroid/content/Context;

    .line 35
    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mInflater:Landroid/view/LayoutInflater;

    .line 36
    iput-object p2, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mFilter:Landroid/widget/Filter;

    .line 37
    invoke-static {p1}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->getThemeSettingsHelper(Landroid/content/Context;)Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v0

    iput-object v0, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    .line 38
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 42
    iget-object v0, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mFilterList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getFilter()Landroid/widget/Filter;
    .locals 1

    .prologue
    .line 77
    iget-object v0, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mFilter:Landroid/widget/Filter;

    return-object v0
.end method

.method public getFilterList()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;>;"
        }
    .end annotation

    .prologue
    .line 81
    iget-object v0, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mFilterList:Ljava/util/List;

    return-object v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 47
    iget-object v0, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mFilterList:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 52
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 6
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    const/4 v4, 0x0

    .line 57
    if-nez p2, :cond_0

    .line 58
    iget-object v2, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mInflater:Landroid/view/LayoutInflater;

    const v3, 0x7f03003c

    invoke-virtual {v2, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 59
    new-instance v0, Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;

    invoke-direct {v0, p0, v4}, Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;-><init>(Lcom/netease/newsreader/adapter/CitySearchAdapter;Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;)V

    .line 60
    .local v0, holder:Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;
    const v2, 0x7f0c00f6

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v0, Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;->title:Landroid/widget/TextView;

    .line 61
    invoke-virtual {p2, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 64
    .end local v0           #holder:Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;
    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;

    .line 65
    .restart local v0       #holder:Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/adapter/CitySearchAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Map;

    .line 66
    .local v1, item:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    iget-object v3, v0, Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;->title:Landroid/widget/TextView;

    const-string v2, "city"

    invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    invoke-virtual {v3, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 67
    iget-object v2, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mThemeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v3, p0, Lcom/netease/newsreader/adapter/CitySearchAdapter;->mContext:Landroid/content/Context;

    iget-object v4, v0, Lcom/netease/newsreader/adapter/CitySearchAdapter$ViewHolder;->title:Landroid/widget/TextView;

    const v5, 0x7f080027

    invoke-virtual {v2, v3, v4, v5}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 68
    return-object p2
.end method
